// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import Vuex from 'vuex'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import App from './App'
import router from './router'
import store from './store'
import axios from 'axios'
import FingerPoint from 'tc_fingerpoint'

//  添加mockjs拦截请求，模拟数据返回
import './mock'

Vue.use(ElementUI) // 注册饿了么组件库
Vue.use(Vuex) //  注册
Vue.prototype.axios = axios
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
const app = new FingerPoint({
  appid: 'ZHONGHANG2wBReVC',
  'geo': false,
  'geoTime': 1
})
app.getToken((token) => {
  app.getFingerPoint(token, (data) => {
    // alert(token)
    // alert(data.fp)
    // console.log(data)
  })
})
app.getGeoResult().then(d => {
  // alert(d)
  // console.log(d)
})
